Verification of Java Programs with Generics

نویسندگان

  • Kurt Stenzel
  • Holger Grandy
  • Wolfgang Reif
چکیده

Several proof systems allow the formal verification of Java programs, and a specification language was specifically designed for Java. However, none of these systems support generics that were introduced in Java 5. Generics are very important and useful when the collection framework (lists, sets, hash tables etc.) is used. Though they are mainly dealt with at compile time, they have some effect on the run-time behavior of a Java program. Most notably, heap pollution can cause exceptions. A verification system for Java must incorporate these effects. In this paper we describe what effects can occur at run time, and how they are handled in the KIV system [18] [2]. To the authors knowledge, this makes KIV the first verification system to support Java’s generics.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Runtime Verification for Generic Classes with ConGu 2

Even though generics became quite popular in mainstream objectoriented (OO) languages, approaches for checking at runtime the conformance of such programs against formal specifications still lack appropriate support. In order to overcome this limitation within CONGU, a tool-based approach we have been developing to support runtime conformance checking of Java programs against algebraic specific...

متن کامل

Beyond Generics: Meta-Level Parameterization for Effective Generic Programming

Generic (polymorphic) type-safe containers are the primary motivation for generics (in Ada, Eiffel, and recently proposed additions to Java and C#) and templates (in C++). We studied buffer classes and found that they could not be unified by type parameters. At times, unification required non-type parameters (e.g., parameters representing operators, keywords or algorithmic details) and at other...

متن کامل

Formal Language Recognition with the Java Type Checker

This paper is a theoretical study of a practical problem: the automatic generation of Java Fluent APIs from their specification. We explain why the problem’s core lies with the expressive power of Java generics. Our main result is that automatic generation is possible whenever the specification is an instance of the set of deterministic context-free languages, a set which contains most “practic...

متن کامل

An Empirical Study on Limits of Clone Unification Using Generics

Generics (templates) attempt to unify similar program structures to avoid explosion of redundant code. How well do generics serve this purpose in practice? We try to answer this question through empirical analysis from two case studies. First, we analyzed the Java Buffer library in which 68% of the code was redundant due to cloning. We were able to remove only 40% of the redundant code using th...

متن کامل

The Reaction of Open-Source Projects to New Language Features: An Empirical Study of C# Generics

Language designers introduce new language features in programming languages because those features are claimed to be bene cial. In this paper, we investigate claims made about the generics language feature, and compare how those claims stack up in C# versus Java. Through an empirical study of the generics feature in open-source projects, we found that (1) although they have the same claimed ben...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008